package com.yantong.mapper;

import com.yantong.pojo.MarketingSeckillSku;
import com.yantong.pojo.MarketingSeckillSkuExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MarketingSeckillSkuMapper {
    long countByExample(MarketingSeckillSkuExample example);

    int deleteByExample(MarketingSeckillSkuExample example);

    int deleteByProductId(@Param("productId") Long productId);

    int deleteByProductCenterId(@Param("productCenterId") Long productCenterId);

    int insert(MarketingSeckillSku record);

    int insertSelective(MarketingSeckillSku record);

    List<MarketingSeckillSku> selectByExample(MarketingSeckillSkuExample example);

    int updateByExampleSelective(@Param("record") MarketingSeckillSku record, @Param("example") MarketingSeckillSkuExample example);

    int updateByExample(@Param("record") MarketingSeckillSku record, @Param("example") MarketingSeckillSkuExample example);

    MarketingSeckillSku selectByPrimaryKey(Long id);

    int changeStock(@Param("total") Integer total, @Param("activityId") Long activityId, @Param("skuId") Long skuId);

    MarketingSeckillSku getSkuBySpecs(@Param("activityId") Long activityId, @Param("specs") String specs);

    List<MarketingSeckillSku> getSkuByActivityId(@Param("activityId") Long activityId);

    MarketingSeckillSku getSkuBySkuId(@Param("activityId") Long activityId, @Param("skuId") Long skuId);
}